package com.hdoit.ares.web.official.modelconfig;


import com.hdoit.ares.web.official.providers.ArticalClassifyTreeProvider;
import com.hdoit.ares.web.official.providers.ImportantTypeProvider;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.SwitchAttribute;
import com.tennetcn.component.attribute.TreeListAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;
import com.tennetcn.web.cbase.providers.YesOrNoSwitchProdiver;

public class ArticalSearchConfig extends ModelMetadataAttributeConfiguration{
	public ArticalSearchConfig(){
        this.setProperty("startDate")
            .hasAttribute(new DisplayNameAttribute("时间从"));
        
        this.setProperty("endDate")
        	.hasAttribute(new DisplayNameAttribute("到"));

        this.setProperty("typeId")
            .hasAttribute(new DisplayNameAttribute("文章分类"))
            .hasAttribute(new TreeListAttribute(new ArticalClassifyTreeProvider()));

        this.setProperty("display")
            .hasAttribute(new DisplayNameAttribute("是否显示"))
            .hasAttribute(new SwitchAttribute(new YesOrNoSwitchProdiver()));

        this.setProperty("importantType")
            .hasAttribute(new DisplayNameAttribute("文章重要性"))
            .hasAttribute(new DropDownListAttribute(new ImportantTypeProvider("senior")));
    }
}
